-- GENERATED SPELL FOR [Pyrewood Tailor] --


function spell0_3530(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(15657,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3530', 586, 1)
end

function spell1_3530(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(6713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3530', 5301, 1)
end

function spell2_3530(pUnit, Event) --@Expose Weakness,n/a--
pUnit:FullCastSpellOnTarget(7140,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3530', 5000, 1)
end

function Sorts_3530(pUnit, Event)
local choix_sorts_3530 = math.random(0, 2)
if choix_sorts_3530 == 0 then
pUnit:RegisterEvent('spell0_3530', 1, 1)
end
if choix_sorts_3530 == 1 then
pUnit:RegisterEvent('spell1_3530', 1, 1)
end
if choix_sorts_3530 == 2 then
pUnit:RegisterEvent('spell2_3530', 1, 1)
end
end

function mob3530_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3530', math.random(1500, 3000), 1)
end

function mob3530_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3530_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3530_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3530, 1, 'mob3530_Action')
RegisterUnitEvent(3530, 2, 'mob3530_Leave')
RegisterUnitEvent(3530, 3, 'mob3530_Kill')
RegisterUnitEvent(3530, 4, 'mob3530_Die')
